package com.ruoyi.teacher.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 部门管理对象 bbl_department
 *
 * @author TengZeng
 * @date 2023-05-18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Department extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 部门id主键
     */
    private Long id;

    /**
     * 部门编号
     */
    @Excel(name = "部门编号")
    private String sn;

    /**
     * 部门名称
     */
    @Excel(name = "部门名称")
    private String name;

    /**
     * 部门上级分类层级id
     */
    @Excel(name = "部门上级分类层级id")
    private String dirpath;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    private Long userId;

    /**
     * 上级部门
     */
    @Excel(name = "上级部门")
    private Long parentId;

    //展示子部门字段
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList();


}
